package ipconf

import (
	"plato/common/config"
	"plato/ipconf/domain"
	"plato/ipconf/source"

	"github.com/cloudwego/hertz/pkg/app/server"
)

func RunMain(path string) {
	config.Init(path)
	source.Init() //数据源要优先启动
	domain.Init() //初始化调度层
	s := server.Default(server.WithHostPorts(":6789"))
	s.GET("/ip/list", GetIpInfoList)
	s.Spin()
}
